package cn.hp.beauty.service.impl;

import cn.hp.beauty.domain.Userinfo;
import cn.hp.beauty.mapper.UserinfoMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserinfoServiceImpl implements UserinfoService{

    @Resource
    private UserinfoMapper userinfoMapper;


    @Override
    public List<Userinfo> findList(Userinfo userinfo) {
        return userinfoMapper.selectList(userinfo);
    }

    @Override
    public int insertUserinfo(Userinfo userinfo) {
        return userinfoMapper.insertSelective(userinfo);
    }

    @Override
    public int updateUserinfo(Userinfo userinfo) {
        return userinfoMapper.updateByPrimaryKeySelective(userinfo);
    }

    @Override
    public int deleteById(int id) {
        return userinfoMapper.deleteByPrimaryKey(id);
    }
}
